<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
<style type="text/css">
	.box{
		height: 200px;
		width: 200px;
		background: red;
	}
	.box1{
		height: 200px;
		width: 200px;
		background: blue;
	}
</style>
<script type="text/javascript">
	window.onload =function(){
 	 box = document.getElementByClassName("box");
 	 box1 = document.getElementByClassName("box1");
 	 x=0;
	 box[0].onclick=function(){
		if(x==0){
			data = box1[0].innerHTML;
			box[0].style.innerHTML=data;
 
			box1[0].style.display="none";x=1;
		}else{
			box[0].innerHTML="";
			box1[0].style.display="block";x=0;
	}
}
   
 
}
</script>
	
</head>
<body>
<div class="box">
	
</div>
<div class="box1">你是傻逼吗</div>
	
</body>
</html>